//
//  UIImage+Extension.swift
//  新浪微博
//
//  Created by Mac on 17/1/2.
//  Copyright © 2017年 itcast. All rights reserved.
//

import UIKit

extension UIImageView {

    // 图片名称,宽,高,中心点
    convenience init(imageName:String, width:CGFloat, height:CGFloat,center:CGPoint) {
        self.init()
        self.image = UIImage(named: imageName)
        self.bounds.size = CGSize(width: width, height: height)
        self.center = center
    }
    
    // 图片名称,宽,高
    convenience init(imageName:String, width:CGFloat, height:CGFloat){
        self.init()
        self.image = UIImage(named: imageName)
        self.bounds.size = CGSize(width: width, height: height)
    }
}
